﻿namespace PgBirdie.Core.Model.Database.Structure.ColumnTypes
{
    public abstract class PgColumnTypeBase
    {
        /// <summary>
        /// Column type name in PostgreSQL.
        /// </summary>
        public string Name { get; private set; }

        /// <summary>
        /// Column type alias in PostgreSQL.
        /// </summary>
        public string Alias { get; private set; }

        /// <summary>
        /// Column type as enumeration for PgBirdie.
        /// </summary>
        public ColumnDataType AsEnum { get; private set; }

        /// <summary>
        /// Column type as .NET type.
        /// </summary>
        public string NetType { get; private set; }

        protected PgColumnTypeBase(ColumnDataType type, string netType, string name)
        {
            AsEnum = type;
            NetType = netType;
            Name = name;
        }
    }
}